package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.service.AsyncService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class TestController {

@Resource
private AsyncService asyncService;

    @GetMapping("/async")
    public String async() throws Exception{
            log.debug("----------现在开始执行正常的业务代码---------");
                    asyncService.test();
                log.debug("-----------业务执行结束---------");
                return "ok";
    }
}
